package com.hth.eureka.provider;


import com.netflix.servo.util.ThreadCpuStats;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.actuate.integration.IntegrationGraphEndpoint;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ProviderController {

    @Value("${server.port}")
    Integer port;

    @GetMapping("/map")
    public String getMapper() {
        return "get success from port : " + port;
    }

    @PostMapping("/post")
    public String postMapper(@RequestParam(name = "id") Integer id) {
        return "post data is : " + id;
    }


}
